package com.vhall.component.entity.dictionary.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 栏目运营级别
 *
 * @author shimingming
 * @since 2023/4/14 10:31
 */
@Getter
@AllArgsConstructor
public enum ColumnOperationalLevelEnum implements BaseEnum {


    NORMAL(1, "正常运营"),
    STANDARDS(2, "精品达标"),
    EARLY_WARNING(3, "降级预警"),
    REDUCE_TO_A_LOWER_RANK(4, "触发降级"),

    ;

    private Integer value;

    private String name;

    public static String getName(Integer value) {
        for (ColumnOperationalLevelEnum template : ColumnOperationalLevelEnum.values()) {
            if (template.getValue().equals(value)) {
                return template.name;
            }
        }
        return null;
    }

    public static ColumnOperationalLevelEnum parse(Integer value) {
        for (ColumnOperationalLevelEnum type : ColumnOperationalLevelEnum.values()) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }

}
